<?php
include 'kahlua.ini';
include 'classes/utils/smarty_connect.php';
include_once 'classes/handlers/videosHandler.php';
include_once 'classes/db.php';
include_once 'classes/classNotas.php';

$arrVideos = videosHandler::getTop3SexyNotas();

$smarty = new smarty_connect;
$smarty->template_dir = '/projects/newmasmedio/templates';

$arrNotas = Array();
$myNota = new Notas();

$arrMes = array(
				"1" => "Ene",
				"2" => "Feb",
				"3" => "Mar",
				"4" => "Abr",
				"5" => "May",
				"6" => "Jun",
				"7" => "Jul",
				"8" => "Ago",
				"9" => "Sep",
				"10" => "Oct",
				"11" => "Nov",
				"12" => "Dic"
			);
			
if(isset($_POST["submit1"])){
	$mes = $_POST["mes"];
	$ano = $_POST["ano"];
	$arrNotas = $myNota->getColumnasRS($mes, $ano);
}else{
	$mes = "";
	$ano = "";
	$arrNotas = $myNota->getColumnasRS();
}

$smarty->assign("CSS", array("newmasmedio.css", "columnas.css"));
$smarty->assign("JS", array("jquery-1.3.2.js","masmedio.js"));
$smarty->assign("title", "MasMedio.com | Noticias al instante");
$smarty->assign("arrVideos", $arrVideos);
$smarty->assign("arrNotas", $arrNotas);
$smarty->assign("arrMes", $arrMes);
$smarty->assign("mes", $mes);
$smarty->assign("ano", $ano);
$smarty->display('columnas.tpl');